# 元组的三种创建方式
tup1 = ('physics', 'chemistry', 1997, 2000)
tup2 = (1, 2, 3, 4, 5 )
tup3 = "a", "b", "c", "d"

print(tup3)

# list转tuple
list = [0, 256, 213, 296]
tup4 = tuple(list)
print(tup4)

tup5 = (0,0)
tup7 = (0,0)
tup6 = tuple([0,0])  # String转元组的话，需要先放到list中
print(tup5 == tup6)   # String转来的元组与定义的元祖是不等价的
print(tup5 == tup7)
print(tup6)

# 元组不能被重新赋值
tup6 = (1,2,3)